Ladies and gentlemen, crossing, the last time we were talking about examples of constants in C, this time we say the example is: uppercase and lowercase character conversion . Gossip Hugh, words return to the positive. Let's talk C chestnuts
Given a word, you need to determine whether the uppercase word is used correctly.
We define that the use of uppercase words is correct in the following cases:
All letters are in uppercase, such as "USA ".
All letters in a word are not in
The difference between #define, const, typedef#define is not defining variables, it's just for text substitution.For example:#define PI 3.1415926float Angel;angel=30*pi/180;Then, when the program is compiled, the compiler will first "#define PI 3.141
Title Description: Write the program, the output string of uppercase letters, lowercase small mother and the number of other. If there is a string "Helle, this is A test textfile.123456, Tannk you!!", the number of uppercase letters: 3, lowercase
Definition:
The # define Directive
You can use the # define directive to give a meaningful name to a constant in your program. The two forms of the syntax are:
Syntax
# Define identifier token-stringopt
# Define identifier [(identifieropt,...,
There are many places in the C language where macro definitions are used, such as in header files to prevent header files from being repeatedly included:
#ifndef ctest_header_h
#define CTEST_HEADER_H
/header file content
#endif
Many macro
The Define () function defines a constant.define () functions: Defines a constant. Constants is much like variables, except for the following differences: constants [constant] and variables [variable] There are many similarities, so it is easy to
Given a word, you need to determine whether the capitalization of the word is used correctly.We define that the capitalization usage of a word is correct in the following cases:1. All letters are capitalized, such as "USA".2. All letters in the word
Write a program, enter a string (not more than 20 length), and then the string of each character in the case of the transformation, will be uppercase letters into lowercase, lowercase letters into uppercase, and then the new string output.Input
From the Nginx source code, we will talk about the most efficient code for converting uppercase and lowercase characters and the science of ASCII code tables.
The nginx source code is as follows:
Nginx-1.6.1/src/core/ngx_string.h 47-48 rows
#define
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.